Skip to content

update convert_full_model.py#34

Open
xoqhdgh1002 wants to merge 6 commits intoucsd-hep-ex:mainfrom
xoqhdgh1002:main
Open

update convert_full_model.py#34
xoqhdgh1002 wants to merge 6 commits intoucsd-hep-ex:mainfrom
xoqhdgh1002:main

Conversation

@xoqhdgh1002
Copy link
Copy Markdown

No description provided.

Comment thread convert_full_model.py Outdated
@xoqhdgh1002
Copy link
Copy Markdown
Author

xoqhdgh1002 commented Oct 22, 2024

Traceback (most recent call last):
  File "/home/btae/workspace/test/convert_full_model.py", line 71, in <module>
    hls_model = hls4ml.converters.convert_from_keras_model(model,**convert_options,output_dir=output_dir)
  File "/home/btae/Downloads/hls4ml/hls4ml/converters/__init__.py", line 234, in convert_from_keras_model
    return keras_to_hls(config)
  File "/home/btae/Downloads/hls4ml/hls4ml/converters/keras_to_hls.py", line 335, in keras_to_hls
    hls_model = ModelGraph(config, layer_list, input_layers, output_layers)
  File "/home/btae/Downloads/hls4ml/hls4ml/model/graph.py", line 347, in __init__
    raise RuntimeError(
RuntimeError: Currently only support the case when input variables and input layer names match
Input layers = ['input_cont', 'input_pxpy', 'input_cat0', 'input_cat1'], input_vars = ['input_cat0', 'input_cat1', 'input_cont', 'input_pxpy']

When I ran my code, I got this error message. Have you got the same error, or do you have any ideas about this?

@jmduarte
Copy link
Copy Markdown
Member

@xoqhdgh1002 can you share how you reproduce this error? I have seen the error before. It has to do with how hls4ml parses the inputs to a model (and they seemingly become out of order). I thought we resolved it in a more recent hls4ml version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants